#ifndef __ACB2_CONSOLE_H_INCLUDED__
#define __ACB2_CONSOLE_H_INCLUDED__


#define MODE_CMDLINE   (48)
#define MODE_BUTTONS   (31)
#define MODE_KEY_PANEL (32)
#define MODE_PANEL     (33)
#define MODE_COMMENTS  (34)
#define MODE_REBOOT    (99)
#define MODE_MORSE     (222)

#define CH_ESCAPE     (27)
#define CH_RETURN     (13)
#define CH_LINEFEED   (10)
#define CH_BACKSPACE  (8)
#define CH_TAB        (9)
#define CH_TILDE      ('~')

#define MAXCMD 64

#define devaddr_a   0
#define nwkskey_a   4
#define appskey_a   20

typedef struct 
{
    uint32_t devaddr;
    uint8_t nwkskey[16];
    uint8_t appskey[16];
}T_CONFIG;

typedef union UINT32_UINT8
{
    uint32_t  value_uint32;
    uint8_t   value_uint8[4];
}U_UINT32_UINT8;

extern T_CONFIG ee_config;

extern int ACB2_ECL_config_test( int keyc, char *keyv[], int keyl[] );
extern int ACB2_ECL_config_action( int keyc, char *keyv[], int keyl[] );
extern uint32_t Hex2Dec_N( const char *hexBuf, uint8_t size, uint8_t is_hex );
void ee_config_read(uint8_t addr);
void ee_config_write(uint8_t addr);

extern Lora_ECL_config_display( int keyc, char *keyv[], int keyl[] );
//extern int printf(int,...);


#endif
